#pragma once

#include "e2d/core/Component.h"
#include "e2d/core/EntityMap.h"

#include "e2d/core/PrefebMap.h"

namespace e2d
{
	struct Prefeb :public e2d::Component
	{
		FXCC_DEFINE_COMPONENT_LABEL(Prefeb);

		e2d::EntityMap m_SourceEntity{};
		
		e2d::PrefebMap m_PrefebMap;

		void OnLoad() override;

		void OnStart() override;

		void OnUpdate() override;

		void OnUpdateRuntime() override;

		void OnDestroy() override;

		void LoadSource();
		
		void UpdateSource();
	};
};